Skip to content

docs(skills): drop the duplicated ASCII field-type decision tree from objectstack-data rules - #16369

Queued
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-16324-field-types-decision-tree
Queued

docs(skills): drop the duplicated ASCII field-type decision tree from objectstack-data rules#16369
claude[bot] wants to merge 1 commit into
mainfrom
claude/issue-16324-field-types-decision-tree

Conversation

@claude

@claude claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #16324

改前 → 改后

One file, one pure deletion, no additions: skills/objectstack-data/rules/field-types.md loses the ## Field Type Decision Tree heading and its fenced ASCII block (71 lines, 2,142 bytes, 536 tokens). Every table is untouched, the top-of-file blockquote is untouched, and Common Field Configurations / Incorrect vs Correct are untouched.

No pointer line was added. The ruling left that to this flight, and two measurements argued against one:

  1. No published skill file cross-references the docs tree. git grep -n "content/docs/" -- skills/ returns zero hits, and the only docs URL anywhere in the objectstack-data bundle is a docsUrl: property value inside a code example. The bundle is self-contained by convention, and a repo path such as content/docs/... is not openable by a customer agent that has only the published bundle.
  2. The page the pointer would name contradicts this file. Its mermaid flowchart routes Secret value to password (line 36), where this file's own password row warns the value is stored plaintext at rest and names secret as the recommended credential type. Sending the reader there for "the same tree" hands them the authoring trap the table exists to prevent. Filed separately as docs(data-modeling): the field-type decision-tree flowchart routes "Secret value" to password, contradicting the same page's table, ADR-0100 and the shipped skill rule #16366 — that card stays open, it is not addressed here.

The block also taught nothing the tables do not: each ## category heading already answers the tree's top-level question and each row's When to Use answers its leaf, and the tree was strictly less complete than the tables (slider appeared in no branch).

Token reading (ceiling NOT lowered here)

before after delta
rules/field-types.md tokens 3578 3042 -536
its ceiling 3584 3584 unchanged
its headroom 6 542 +536
ratcheted authored bundle 140395 139859 -536
bundle total (whole shipped tree) 151041 150505 -536

Gate line, verbatim:

✓ check-skills-token-ratchet: skills/objectstack-data/rules/field-types.md is 3042 tokens (ceiling 3584; headroom 542).
✓ check-skills-token-ratchet: 36 authored bundle file(s) within their ceilings; 10 generator-owned file(s) measured, not ratcheted.

Per the card, the 3584 row in scripts/check-skills-token-ratchet.mjs is not lowered in this PR — a ceiling move is its own ruling, and this is the reading it would rule on.

Governed-surface line/token readings (skills/**)

before after delta
edited file — lines 396 325 -71
edited file — bytes 14309 12167 -2142
edited file — tokens 3578 3042 -536
whole skills/** — lines 13656 13585 -71
whole skills/** — tokens 151041 150505 -536

Net negative in both units; no line budget is spent and none is bought.

Reader grep before deleting

Searched over skills/, scripts/, content/docs/, packages/*/src/** tests, and every must_contain token in the tree.

search hits verdict
Field Type Decision Tree 4 3 are the docs page's own title and two links to that page; the 4th was the deleted heading. No reader of the skill block.
Decision Tree (case-insensitive) 20 Only skills/objectstack-data/SKILL.md:45 names this file's block — prose in an index line, read by no gate. See 验收备注.
What kind of data? 2 The deleted line, plus the docs mermaid's independent START node.
Owned child 2 The deleted line, plus an unrelated TSDoc in packages/spec/src/data/field.zod.ts:1251.
Name-keyed map → 1 The deleted line only.
Single choice, always visible 1 The deleted line only.
must_contain tokens 0 skills/objectstack-data/evals/ holds only README.md; the tree's one evals JSON carrying must_contain belongs to the objectstack-ui bundle and names nothing here.
scripts/ readers 1 check-skills-token-ratchet.mjs:420 names the file (its ceiling row), never the block.

Zero readers go red. One goes stale in prose only, reported not repaired: SKILL.md:45.

Merge-tree proof against PR #16187

git merge-tree --write-tree HEAD 5a30844272exit 0, 0 CONFLICT lines, merged tree 0217dc4b5b472ac009ab73b3dc81ebae8fa2523d. That PR's diff on this file sits at lines 91 and 106-110; this deletion started at line 147. Disjoint, and #16187 remains open and untouched by this branch.

Gates

Every gate below, the ratchet readings and the whole-repo lint were run after the final commit, on head bf3e5690a2 — the tree this PR proposes, not an earlier one.

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 20 families from the committed change set (1 path, three-dot against merge base a87163c89). Every one was run with its exit captured before any pipe, then reconciled:

Run reconciliation — 20 derived, 20 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 20 derived famil(ies) accounted for — 20 run, 0 NOT-MEASURED.

All 20 exit 0. One needed a second measurement: pnpm --filter @objectstack/lint run check:doc-formula-expressions first returned exit 3 — PREREQUISITE NOT MET (@objectstack/formula and @objectstack/lint unbuilt), which its own text calls NOT MEASURED rather than a finding; after turbo run build --filter=@objectstack/formula --filter=@objectstack/lint it re-ran at exit 0.

Named separately by the dispatch:

  • check-skills-token-ratchet — self-test exit 0, live exit 0; readings quoted above.
  • check-nul-bytesexit 0. Self-scan of the edited file for control characters: clean.
  • check-governed-merges --test skills/objectstack-data/rules/field-types.mdexit 3, as expected:
    ⛔  GOVERNED — a human merge is the review record for this PR (#9495 regime).
        skills/** ×1 — the published skills catalog
    
  • check-skill-id-lintnot applicable, and it does not reach this diff. Its corpus is SCAN_ROOT = '.claude/skills/pm-dispatch' plus EXTRA_FILES = ['.claude/agents/os-dev.md', 'AGENTS.md']; the published skills/** catalog is outside it, which is why the derivation does not name it either.
  • Whole-repo pnpm lint (eslint . --no-inline-config) through scripts/pm/os-verify-lock.sh, slot issue-16324 — acquired after 1s, held 139s, exit 0, no findings. Not narrowed, so there is no narrowing to declare. Shared-box seconds, per the lock's own verdict line.

No changeset: skills/** publishes nothing from a package, so skip-changeset is applied.

验收备注

  • skills/objectstack-data/SKILL.md:45 goes stale in prose. It reads All 49 field types with decision tree and configs; after this PR that file has tables and configs but no decision tree. The dispatch ruled ONE file, so it is reported here rather than repaired — a four-word edit that belongs with the ceiling-lowering PR this reading is meant to enable. check:corpus-claim-drift is green over it, so no gate catches this. Noted, not filed.
  • The docs page's own flowchart is wrong about credentials, independently of this PR. Filed as docs(data-modeling): the field-type decision-tree flowchart routes "Secret value" to password, contradicting the same page's table, ADR-0100 and the shipped skill rule #16366 (unassigned, no labels, for triage) under the maintainer's finding threshold: it is a metadata-authoring trap with a data-at-rest consequence, pinned on the other side by packages/spec/src/data/object.test.ts:2367. That number is named here for reference only and is not addressed by this branch.
  • The ASCII tree was already drifting. It omitted slider entirely and compressed the password / secret distinction into one parenthetical. Both are arguments that a second rendering of a 49-row table is a maintenance liability, not just tokens.

维护者速读(草稿)

这个 PR 干了什么。objectstack-data 技能包里 rules/field-types.md 中那段 ASCII「字段类型决策树」整块删掉,只删不加。这段树把同一个文件里已有的分类表格又抄了一遍:表格的每个 ## 小节标题就是树的第一层问题,每行的 When to Use 就是树的叶子。客户每开一次会话,这份技能包整包进上下文,这段重复就再被计费一次。

为什么值得单独开一张卡。 这个文件的 token 天花板是 3584,删之前实际 3578,余量只有 6。上一轮为了写进两句契约说明,被迫删掉了一段不相干的文字来腾地方。这次删完是 3042,余量 542 —— 一次性从这个文件自己的冗余里付账,而不是让下一个作者继续拿无关内容抵扣。

没有加「指路」那一行,这是本轮唯一的自由裁量。 派发允许加一行指向文档站的同名 mermaid 图。实测两条理由否掉了它:整个已发布技能语料里,没有任何一个文件引用 content/docs/ 路径(0 命中),客户手里只有技能包、打不开仓库路径;更要紧的是,那张 mermaid 图第 36 行把「Secret value」指向 password,而本文件的表格明确写着 password 在普通对象上是明文落盘、凭据要用 secret。指过去等于把读者送进本表格专门要防的坑。该文档缺陷已另开 #16366 交分诊,本 PR 不碰。

风险面。 纯删除,不改任何表格、不改文件开头的约束说明、不改天花板数字。删前按维护者要求扫过全部读者:除了 SKILL.md 第 45 行那句「with decision tree」的描述会变得不准(已在验收备注里点名,按「只改一个文件」的裁定没有顺手改),没有任何门禁、测试或 eval 断言读这段内容。与仍在等人工合并的 #16187 做过 git merge-tree 验证,零冲突。

席位意见。


🤖 Generated with Claude Code

Generated by Claude Code


Generated by Claude Code

`skills/objectstack-data/rules/field-types.md` carried a ~2.1 KB fenced ASCII
"Field Type Decision Tree" that re-listed the leaves of the same file's own
per-category tables. It taught nothing those tables do not already teach — each
`##` category heading answers the tree's top-level question and each row's
"When to Use" answers the leaf — and it was strictly less complete than them
(`slider` appeared in no branch). A mermaid rendering of the same tree already
ships to the same reader in the docs site.

The file is loaded whole into customer agent context on every session, so the
duplicate was billed per session, forever. Removing it frees real headroom in
the file's own density instead of taxing whichever unrelated sentence the next
author can spare.

Every table, the top-of-file blockquote and the `Common Field Configurations`
and `Incorrect vs Correct` sections are untouched; the change is a pure
deletion, no pointer line added.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 6, 2026
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Sep 6, 2026
@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

ACCEPT — governed in-seat review of PR #16369, head bf3e5690a2 (skills seat, 2026-09-06T16:0xZ).

Implemented-by: claude/issue-16324-field-types-decision-tree (os-dev subagent, opus — no path-derived tier mandate on skills/**; a prose deletion)
Reviewed-by: session_019RfFHiRCSs3JXLK4cwcfox (skills seat)

Verified in a detached compare worktree at the PR head, not from the report:

  • One file, a pure deletion: skills/objectstack-data/rules/field-types.md −71 lines, 0 additions — the ## Field Type Decision Tree heading and its fenced ASCII block, nothing else. Every table, the top-of-file blockquote (the fileAttachmentConfig refusal still present), the Relational tree row (PR skills(objectstack-data): the tree rows state the landed reference contract #16187's, untouched at line 91) all survive; the file is 325 lines. check-skills-token-ratchet live: 3042 tokens against the unchanged 3584 ceiling (headroom 6 → 542), 36 authored bundle files within their ceilings; the ceiling row in scripts/check-skills-token-ratchet.mjs is deliberately not moved — ruled below. check-governed-merges --test exit 3 (skills/**). git merge-tree against PR skills(objectstack-data): the tree rows state the landed reference contract #16187's head 5a30844272 exit 0, no conflict (that PR touches lines 91 and 106–110; the deletion starts at 147). The dev's reader grep over skills/, scripts/, content/docs/, package tests and every must_contain token finds no reader that goes red; the one prose mention (skills/objectstack-data/SKILL.md:45, "with decision tree") is ruled below. PR checks on bf3e5690a2: 23 success, 11 skipped, 0 failed (34 runs, converged); the dev's derived union 20/20 with --ran at 0 NOT-MEASURED, whole-repo pnpm lint through the verify lock in one acquisition.
  • Report hygiene: os-dev-report on skills(objectstack-data): rules/field-types.md carries a ~1800-byte ASCII decision tree that duplicates the docs' mermaid page, in a file 17 tokens under its ceiling #16324, JSON closes; PR body opens Fixes #16324; ## 维护者速读(草稿) present; no model identifier; skip-changeset read back comparatively; zero MCP calls.

Rulings on the two open questions

  1. Pointer line — A, none. Measured: no published skill file cites a content/docs path (0 hits), so a pointer would be the corpus's only outbound repo path, and the page it would name currently routes Secret value to password — the trap this file's own table exists to prevent. A pointer to a contradicting source is the lenient second contract the repo forbids. Option C (a site URL after docs(data-modeling): the field-type decision-tree flowchart routes "Secret value" to password, contradicting the same page's table, ADR-0100 and the shipped skill rule #16366 lands) is staged and has no external-user evidence behind it.
  2. skills/objectstack-data/SKILL.md:45 ("All 49 field types with decision tree and configs") — A, folded into the re-lock card the seat files in this stroke: after PR skills(objectstack-data): the tree rows state the landed reference contract #16187 and this PR both merge, the file's token ceiling is re-locked at the landed count (the ratchet's ordinary direction — a lowering to landed counts is a re-lock, not a ruling) and the four words come out of SKILL.md:45 in the same PR. Below the finding threshold on its own; noted, as the dev did.

Out-of-scope finding #16366 (the docs flowchart routes Secret value to password, contradicting its own table, ADR-0100 and the shipped skill — an authoring trap with a data-at-rest consequence): a content/docs card, class (c) under the threshold, filed by the dev through REST with its footer intact; triage routes it (the docs lane), not this seat.

Landing regime: governed (skills/**) ⇒ the PR stays a draft; reviewers os-zhuang + hotlong requested in this same act, needs-user-decision added, the final 维护者速读 posted as the next comment; human merge. On the merge #16324 closes by Fixes.


Generated by Claude Code

@claude
claude Bot requested review from hotlong and os-zhuang September 6, 2026 16:01
@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

维护者速读

事情:objectstack-data 技能包的 rules/field-types.md 里有一段 ASCII「字段类型决策树」,把同一个文件的分类表格又抄了一遍——表格的每个小节标题就是树的第一层问题,每行的 When to Use 就是树的叶子。客户每开一次会话整包进上下文,这段重复就再被计费一次;上一轮为了写进两句契约说明,被迫删了一段不相干的文字来腾地方。

改了什么:只删不加,71 行。表格、文件开头的约束说明、tree 那一行(PR #16187 的)全都没动。文件从 3578 tokens 降到 3042,天花板 3584 不动,余量从 6 变成 542——从这个文件自己的冗余里一次付清。

没做什么,以及为什么:没有加「指向文档站同名 mermaid 图」的那一行。实测整个已发布技能语料没有任何文件引用仓库文档路径(客户手里只有技能包),而那张 mermaid 图第 36 行把「Secret value」指向 password——正是本文件表格专门要防的坑(password 在普通对象上明文落盘,凭据要用 secret)。该文档缺陷 dev 已另立 #16366 交分诊。

后续:两个 PR(#16187 与本 PR)都合并后,席位再开一张小卡把该文件的天花板重新锁到落地读数,并顺手改掉技能 SKILL.md 第 45 行那句「with decision tree」。

席位意见:建议合并。受管面(skills/**),人工合并;合并后 #16324 关闭。与仍在等您合并的 #16187 做过 merge-tree 验证,零冲突,先合哪个都行。


Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review September 7, 2026 00:52
@os-zhuang
os-zhuang enabled auto-merge September 7, 2026 00:52
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 7, 2026
Any commits made after this event will not be merged.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 34072528482 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

失败的 job(日志抽取,best effort):

  • Test Core (4/6) — 失败步骤: Run this shard's tests

    @objectstack/plugin-email:test:  FAIL  src/email-service.queue-delivery.test.ts > EmailService — queue delivery on > still refuses the queue for attachments OVER the limit, and stores nothing (#5177)
      ↳ 失败原因: @objectstack/plugin-email:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • src/email-service.queue-delivery.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 1 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 7, 2026
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Queue state read by the skills lane seat (session session_019RfFHiRCSs3JXLK4cwcfox, os-steve) at 01:4xZ, for the approver: this PR was removed from the merge queue at 01:38:55Z by the queue bot (timeline removed_from_merge_queue), after A/B/E/I from the same 00:5xZ batch merged at 01:18Z. The head bf3e5690a2 is unchanged, mergeable_state: clean, 24 check runs green on the head; M #16375, L #15955 and D #16187 from the same batch are still queued. The eviction reason is not on the timeline (the merge-group run is the only witness). The seat does not re-enqueue a governed PR: a human "merge when ready" click puts it back. Nothing else changes; #16324 stays pm:dispatched until the merge.


Generated by Claude Code

@os-zhuang
os-zhuang added this pull request to the merge queue Sep 7, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-user-decision size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants